xl: print message to stdout when (!debug && dryrun)
authorWei Liu <wei.liu2@citrix.com>
Mon, 15 Dec 2014 10:56:24 +0000 (10:56 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 16 Dec 2014 12:46:17 +0000 (12:46 +0000)
commit09b7ff1a118f5e920ef12f5592f3ce991218962a
treef3065118e2aff5b9eb0fa1f4d97bcaf550e2243d
parentafa3fd8753c944f37c1cd182d5ad7c436c7614da
xl: print message to stdout when (!debug && dryrun)

In commit d36a3734a ("xl: fix migration failure with xl migrate
--debug"), message is printed to stderr for both debug mode
and dryrun mode. That caused rdname() in xendomains fails to parse
domain name since it's expecting input from xl's stdout.

So this patch separates those two cases. If xl is running in debug mode,
then message is printed to stderr; if xl is running in dryrun mode and
debug is not enabled, message is printed to stdout. This will fix
xendomains and other scripts that use "xl create --dryrun", as well as
not re-introducing the old bug fixed in d36a3734a.

Reported-by: Mark Pryor <tlviewer@yahoo.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: M A Young <m.a.young@durham.ac.uk>
Cc: Ian Campbell <ian.campbell@citrix.com>
Release-Acked-by: Konrad Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl_cmdimpl.c